<template>
  <div class="home">
    <MdEditor :value="mdValue" :handle-change="onMdChanage" />

    <CodeEditor :value="codeValue" :handle-change="onCodeChange" />
  </div>
</template>

<script lang="ts" setup>
import { defineComponent, ref } from "vue";
import MdEditor from "@/components/MdEditor.vue";
import CodeEditor from "@/components/CodeEditor.vue"; // @ is an alias to /src

const codeValue = ref();
const onCodeChange = (v: string) => {
  console.log("hehe", v);
  codeValue.value = v;
};

const mdValue = ref();
const onMdChanage = (v: string) => {
  console.log("hehe", v);
  codeValue.value = v;
};
</script>
